#ifndef QFAULTMANAGER_H
#define QFAULTMANAGER_H

#include "core_global.h"

#include <QObject>

struct tagFaultInfo
{
    QString m_time;
    int     m_code;
};

class CORELIB_EXPORT QFaultManager : public QObject
{
    Q_OBJECT
public:
    explicit QFaultManager(QObject *parent = 0);
    ~QFaultManager();

    QList<tagFaultInfo*> get_faults();

    void                add_fault(const tagFaultInfo& fault);
    void                remove_fault(int index);
    void                remove_fault(tagFaultInfo* info);
    void                clear_fault();

    void                load();
    void                save();
signals:
    
public slots:
protected:
    QList<tagFaultInfo*>    m_faults;
};

#endif // QFAULTMANAGER_H
